package com.common.exception;


import com.common.ErrorCodeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 业务类异常
 *
 * @ClassName BusinessException
 * @Data 2019/11/22 13:42
 * @Auther zql
 **/
@EqualsAndHashCode(callSuper = true)
@Data
public class BusinessException extends RuntimeException {
    static final long serialVersionUID = 2;
    ErrorCodeEnum errorCodeEnum;

    public BusinessException(ErrorCodeEnum errorCodeEnum) {
       this.errorCodeEnum = errorCodeEnum;
    }

    /**
     * 重写堆栈填充，不填充错误堆栈信息，提高性能
     */
//    @Override
//    public Throwable fillInStackTrace() {
//        return this;
//    }
}

